Programs can be procedure-oriented, non-procedural, problem-oriented, application-oriented, special purpose, problem defining, problem describing, or problem solving {programming types}.
Programming {functional programming} can change input to output by performing logical relations on input. Sequence and location are not important, because input calls functions, not registers.
Programming {procedural programming} can perform actions on register states to get new register states. Actions must be in exact sequence at one location. Modules are command sets that perform one process or procedure {process box}, such as moving values, performing logical AND, executing if-then-else statement, or iterating through do-while or perform-until statement. Modules can be scripts. BASIC depends on procedures or scripts and is useful for small systems and rapid development.
Software can start with objects and find arrangements that satisfy rule {satisfiability solver} (SAT), in reasonable time.
Programming {structured programming} can use independent modules. Programming languages can use objects {object-oriented programming} {component architecture}, rather than procedures. SVL and Perl have both objects and procedures. C++ and Java are almost all object-oriented, can code larger systems, and can require more development time. Rather than procedures, structured programming languages, such as Java, use independent modules {class} about data types (abstract objects) more complex than basic data types such as integers, floating-point numbers, strings, dates, and arrays. Class groups {Java package} are about one system part, such as file control, database, output, input, or flow control. Software systems are package groups.
Objects model data structures such as windows, files, tables, databases, database query results, and images. Data structures have parameters and constant and/or variable properties.
Classes have procedures {methods} about data structures:
Make {constructor} a specific instance of an abstract object with specific property values.
Make an instance {instance method} of an object with a procedure and a returned value.
Open and close windows.
Open file, write to file, read from file, and close file.
Get table-cell value and set table-cell value.
Change object state or property.
Indicate if statement about object state or property is true or false.
Methods can have parameters and return result values. A main static method starts the program and has a procedure that calls objects.
Methods, classes, and packages can call methods, classes, and packages. Classes and packages can share global constants and variables and can modify global variables.
variables
Programs can use global variables in different ways, or different functions can modify global variables {coupling, Java}. Constants can be global.
unique
Functions, methods, classes, and packages have only one copy, called by other functions, methods, classes, or packages.
comments
Packages, classes, functions, and variables can have comments.
format
Commands at same level indent, typically four spaces, to same position. Line lengths are less than 80 characters. Open braces are at line ends, with their close braces on one separate line lined up with opening-line first character {Microsoft style}.
naming
Object names typically have capitalized syllables or words, as in ElecModelWrapper. High-level objects are nouns, as in ElecModelWrapper. Action names start with verbs, as in writeThisFile. Queries start with "get", as in getString. Information collection starts with "put", as in putString. True or false indicators, with boolean datatype, start with "is", as in isConnected. Names about same thing start the same, as in SysProps and SysVars. Typical prefixes are c for constants, g for globals, m for member variables, s for statics, v for variables, and p for parameters. Names are longer than two characters and use letters rather than numbers.
3-Computer Science-Software-Programming
Outline of Knowledge Database Home Page
Description of Outline of Knowledge Database
Date Modified: 2022.0225